package com.controller;

import com.base.BasePageReq;
import com.req.VipLevelReq;
import com.base.BasePageRes;
import com.res.VipLevelRes;
import com.service.VipLevelService;
import com.util.common.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/vip/level")
@RestController
@Api(tags = "vip级别")
public class VipLevelController {
    @Autowired
    private VipLevelService vipLevelService;
    @PostMapping("/save")
    @ApiOperation("vip级别")
    public R<VipLevelRes> saveArtical(@RequestBody VipLevelReq req){

        return R.ok(vipLevelService.saveVipLevel(req));
    }
    @PostMapping("/queryPage")
    @ApiOperation("vip级别分页查询")
    public R<BasePageRes> queryPage(@RequestBody BasePageReq req){
        return R.ok(vipLevelService.queryPage(req));
    }


}
